using System;
using System.Collections.Generic;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public enum ChiTietChuyenBayBUSResult
    {
        OK, DAOERROR
    }
    public class ChiTietChuyenBayBUS
    {
        
        public static ChiTietChuyenBayBUSResult ChonHetCTChuyenBay(List<DTO.ChiTietChuyenBay> ds)
        {
            if (DAO.ChiTietChuyenBayDAO.ChonHetCTChuyenBay(ds))
                return ChiTietChuyenBayBUSResult.OK;
            return ChiTietChuyenBayBUSResult.DAOERROR;
        }

        public static ChiTietChuyenBayBUSResult ThemChuyenBay(DTO.ChiTietChuyenBay ctcb)
        {
            if (DAO.ChiTietChuyenBayDAO.ThemChuyenBay(ctcb))
                return ChiTietChuyenBayBUSResult.OK;
            return ChiTietChuyenBayBUSResult.DAOERROR;
        }
        public static ChiTietChuyenBayBUSResult CapNhatChuyenBay(DTO.ChiTietChuyenBay ctcb)
        {
            if (DAO.ChiTietChuyenBayDAO.CapNhatChiTietChuyenBay(ctcb))
                return ChiTietChuyenBayBUSResult.OK;
            return ChiTietChuyenBayBUSResult.DAOERROR;
        }
    }
}
